<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ include file="header.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<title>登录</title>
	<style>
		td,body{
			padding:5px;
			font-size:12px;
		}
	</style>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
</head>
<body>

		<script type="text/javascript">
			function changeimg() {
				var btn=document.getElementById("btn");
				var img=document.getElementById("img");
				//防止验证码图片缓存
				img.src="vail?tm"+new Date().getTime();
			}
		</script>
		<center>
		<!--处理登录的后台Servlet方法，Login具体路径在web.xml中配置 -->
	    <h2>用户登录</h2>
		<form action="Login" method="post">

			<table width="400" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
				<tr>
					<!-- 用户名，后台LoginServlet中接收的值需和此处一致 -->
					<td width="76" align="center">用&nbsp;户&nbsp;名：</td>
					<td width="324">
						<input type="text" name="username" placeholder="请输入用户名..."></td>
				</tr>
				<tr>
					<!--密码，后台LoginServlet中接收的值需和此处一致 -->
					<td align="center">密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
					<td><input type="password" name="password" placeholder="请输入密码..."></td>
				</tr>
				<tr>
					<td>验证码：</td>>
					<td><span><input type="text" name="vail" /></span>
						<img alt="验证码" src="vail" id="img" />
						<a href="javascript:void(0)" onclick="changeimg()">看不清？</a>
<%--						<input type="button" value="看不清？" onclick="changeimg()" id="btn" />--%>
					</td>
				</tr>
				<tr>
					<td> </td>
					<td><input type="submit" name="login" value="登录">
						<input type="reset" name="Submit2" value="清空"></td>
				</tr>
				<%--    <input type="submit" name="register" value="注册">--%>

				<tr>
					<td> </td>
					<td>如果您还没有注册，请单击<a href="register.jsp">这里</a>注册!</td>
				</tr>
			</table>
		</form>
	</center>
</body>
</html>
	<%@ include file="foot.jsp"%>
